import { BASE_PRE } from "../utils/base.js";

const clienttask = {};

clienttask.list = {
  url: BASE_PRE + "/task/pages",
  method: "post",
  loadingPreset: {
    background: "rgba(0,0,0,0.3)",
  },
};

clienttask.save = {
  url: BASE_PRE + "/task/save",
  method: "post",
  loadingPreset: {
    background: "rgba(0,0,0,0.3)",
  },
};

clienttask.del = {
  url: BASE_PRE + "/task/del",
  method: "get",
  loadingPreset: {
    background: "rgba(0,0,0,0.3)",
  },
};

clienttask.addEquipment = {
  url: BASE_PRE + "/task/add/equi",
  method: "post",
  loadingPreset: {
    background: "rgba(0,0,0,0.3)",
  },
};

clienttask.delEquipment = {
  url: BASE_PRE + "/task/del/equi",
  method: "get",
  loadingPreset: {
    background: "rgba(0,0,0,0.3)",
  },
};

clienttask.mqtttopic = {
  url: BASE_PRE + "/task/mqtt/topic",
  method: "get",
  loadingPreset: {
    background: "rgba(0,0,0,0.3)",
  },
};

clienttask.publishMqtt = {
  url: BASE_PRE + "/task/pub/mqtt",
  method: "get",
  loadingPreset: {
    background: "rgba(0,0,0,0.3)",
  },
};

clienttask.remoteTask = {
  url: BASE_PRE + "/task/remote/task",
  method: "get",
  loadingPreset: {
    background: "rgba(0,0,0,0.3)",
  },
};

clienttask.exportTask = {
  url: BASE_PRE + "/task/export/task",
  method: "get", 
  responseType: "blob",
};

export default clienttask;
